﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Commlibrary
{
    public class Const
    {
        // 非负整数
        public const String REGEX_INT = "^[0-9]*[1-9][0-9]*$";
        // 非负浮点数
        public const String REGEX_FLOAT = "^\\d+(\\.\\d+)?$";

        public const String T_USER_STOCK_XML = "T_USER_STOCK.xml";
        public const String M_STOCK_XML = "M_STOCK.xml";
        public const String M_STOCK_HISTORY_XML = "M_STOCK_HISTORY.xml";

        public const String GET_STOCKINFO_S = "<a href=http://share.jrj.com.cn/cominfo/default_";
        public const String GET_STOCKINFO_E = "</a>";

        public const String GET_STOCK_NAME_S = ".htm>";
        public const String GET_STOCK_NAME_E = "(";

        public const String GET_STOCK_HISTORY_S = "a[{0}]= \"";
        public const String GET_STOCK_HISTORY_E = "\";";


        public const int STOCK_NO_LENGTH = 6;
        public const int MAX_HISTORY_CNT = 80;
        public const int HISTORY_NODE_SIZE = 7;
        public const String HISTORY_NODE_SEP = ":";

        public const String DATE_FMT_YYMMDDHHMMSS = "yyyy/MM/dd HH:mm:ss";

        //http://download.csdn.net/source/1151322
        //http://download.csdn.net/source/1151409

        public const String MSG_00001 = "正在读取Stock初始信息...";
        public const String MSG_00002 = "未发现M_STOCK初始信息，请重新获取!";
        public const String MSG_00003 = "未发现M_STOCK_HISTORY初始信息，请重新获取!";
        public const String MSG_00004 = "未发现T_USER_STOCK初始信息!";
        public const String MSG_00005 = "读取初始信息结束.";

        public const String MSG_00006 = "读取成功!";
        public const String MSG_00007 = "读取失败!";
        public const String MSG_00008 = "开始重新获取M_STOCK信息，请等待...";
        public const String MSG_00009 = "开始重新获取M_STOCK_HISTORY信息，请等待...";
        public const String MSG_00010 = "正在读取第{0}条{1}:{2}的{3}天数据...";
        public const String MSG_00011 = "获取M_STOCK_HISTORY信息结束.";
        public const String MSG_00012 = "总计{0}条Stock需要更新";

        public const String MSG_00013 = "开始生成工作表数据，请等待...";
        public const String MSG_00014 = "生成成功!";
        public const String MSG_00015 = "生成失败!";
    }
}
